package com.istock.union.user.model;

import java.io.Serializable;
import java.util.Date;

public class UserOnlineInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * VARCHAR(24) 必填<br>
     * 
     */
    private String id;

    /**
     * VARCHAR(24)<br>
     * 租户编号
     */
    private String tenantCode;

    /**
     * VARCHAR(50) 默认值[] 必填<br>
     * 用户会话ID
     */
    private String sessionId;

    /**
     * VARCHAR(50) 默认值[]<br>
     * 登录账号
     */
    private String loginName;

    /**
     * VARCHAR(24) 默认值[]<br>
     * 部门名称
     */
    private String deptCode;

    /**
     * VARCHAR(50) 默认值[]<br>
     * 登录IP地址
     */
    private String ipaddr;

    /**
     * VARCHAR(255)<br>
     * 
     */
    private String loginLocation;

    /**
     * VARCHAR(50) 默认值[]<br>
     * 浏览器类型
     */
    private String browser;

    /**
     * VARCHAR(50) 默认值[]<br>
     * 操作系统
     */
    private String os;

    /**
     * TIMESTAMP(19)<br>
     * SESSION创建时间
     */
    private Date startTimestamp;

    /**
     * TIMESTAMP(19)<br>
     * SESSION最后访问时间
     */
    private Date lastAccessTime;

    /**
     * TIMESTAMP(19)<br>
     * 过期时间
     */
    private Date expireTime;

    /**
     * VARCHAR(24) 必填<br>
     * 获得 
     */
    public String getId() {
        return id;
    }

    /**
     * VARCHAR(24) 必填<br>
     * 设置 
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    /**
     * VARCHAR(24)<br>
     * 获得 租户编号
     */
    public String getTenantCode() {
        return tenantCode;
    }

    /**
     * VARCHAR(24)<br>
     * 设置 租户编号
     */
    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode == null ? null : tenantCode.trim();
    }

    /**
     * VARCHAR(50) 默认值[] 必填<br>
     * 获得 用户会话ID
     */
    public String getSessionId() {
        return sessionId;
    }

    /**
     * VARCHAR(50) 默认值[] 必填<br>
     * 设置 用户会话ID
     */
    public void setSessionId(String sessionId) {
        this.sessionId = sessionId == null ? null : sessionId.trim();
    }

    /**
     * VARCHAR(50) 默认值[]<br>
     * 获得 登录账号
     */
    public String getLoginName() {
        return loginName;
    }

    /**
     * VARCHAR(50) 默认值[]<br>
     * 设置 登录账号
     */
    public void setLoginName(String loginName) {
        this.loginName = loginName == null ? null : loginName.trim();
    }

    /**
     * VARCHAR(24) 默认值[]<br>
     * 获得 部门名称
     */
    public String getDeptCode() {
        return deptCode;
    }

    /**
     * VARCHAR(24) 默认值[]<br>
     * 设置 部门名称
     */
    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode == null ? null : deptCode.trim();
    }

    /**
     * VARCHAR(50) 默认值[]<br>
     * 获得 登录IP地址
     */
    public String getIpaddr() {
        return ipaddr;
    }

    /**
     * VARCHAR(50) 默认值[]<br>
     * 设置 登录IP地址
     */
    public void setIpaddr(String ipaddr) {
        this.ipaddr = ipaddr == null ? null : ipaddr.trim();
    }

    /**
     * VARCHAR(255)<br>
     * 获得 
     */
    public String getLoginLocation() {
        return loginLocation;
    }

    /**
     * VARCHAR(255)<br>
     * 设置 
     */
    public void setLoginLocation(String loginLocation) {
        this.loginLocation = loginLocation == null ? null : loginLocation.trim();
    }

    /**
     * VARCHAR(50) 默认值[]<br>
     * 获得 浏览器类型
     */
    public String getBrowser() {
        return browser;
    }

    /**
     * VARCHAR(50) 默认值[]<br>
     * 设置 浏览器类型
     */
    public void setBrowser(String browser) {
        this.browser = browser == null ? null : browser.trim();
    }

    /**
     * VARCHAR(50) 默认值[]<br>
     * 获得 操作系统
     */
    public String getOs() {
        return os;
    }

    /**
     * VARCHAR(50) 默认值[]<br>
     * 设置 操作系统
     */
    public void setOs(String os) {
        this.os = os == null ? null : os.trim();
    }

    /**
     * TIMESTAMP(19)<br>
     * 获得 SESSION创建时间
     */
    public Date getStartTimestamp() {
        return startTimestamp;
    }

    /**
     * TIMESTAMP(19)<br>
     * 设置 SESSION创建时间
     */
    public void setStartTimestamp(Date startTimestamp) {
        this.startTimestamp = startTimestamp;
    }

    /**
     * TIMESTAMP(19)<br>
     * 获得 SESSION最后访问时间
     */
    public Date getLastAccessTime() {
        return lastAccessTime;
    }

    /**
     * TIMESTAMP(19)<br>
     * 设置 SESSION最后访问时间
     */
    public void setLastAccessTime(Date lastAccessTime) {
        this.lastAccessTime = lastAccessTime;
    }

    /**
     * TIMESTAMP(19)<br>
     * 获得 过期时间
     */
    public Date getExpireTime() {
        return expireTime;
    }

    /**
     * TIMESTAMP(19)<br>
     * 设置 过期时间
     */
    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", tenantCode=").append(tenantCode);
        sb.append(", sessionId=").append(sessionId);
        sb.append(", loginName=").append(loginName);
        sb.append(", deptCode=").append(deptCode);
        sb.append(", ipaddr=").append(ipaddr);
        sb.append(", loginLocation=").append(loginLocation);
        sb.append(", browser=").append(browser);
        sb.append(", os=").append(os);
        sb.append(", startTimestamp=").append(startTimestamp);
        sb.append(", lastAccessTime=").append(lastAccessTime);
        sb.append(", expireTime=").append(expireTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserOnlineInfo other = (UserOnlineInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTenantCode() == null ? other.getTenantCode() == null : this.getTenantCode().equals(other.getTenantCode()))
            && (this.getSessionId() == null ? other.getSessionId() == null : this.getSessionId().equals(other.getSessionId()))
            && (this.getLoginName() == null ? other.getLoginName() == null : this.getLoginName().equals(other.getLoginName()))
            && (this.getDeptCode() == null ? other.getDeptCode() == null : this.getDeptCode().equals(other.getDeptCode()))
            && (this.getIpaddr() == null ? other.getIpaddr() == null : this.getIpaddr().equals(other.getIpaddr()))
            && (this.getLoginLocation() == null ? other.getLoginLocation() == null : this.getLoginLocation().equals(other.getLoginLocation()))
            && (this.getBrowser() == null ? other.getBrowser() == null : this.getBrowser().equals(other.getBrowser()))
            && (this.getOs() == null ? other.getOs() == null : this.getOs().equals(other.getOs()))
            && (this.getStartTimestamp() == null ? other.getStartTimestamp() == null : this.getStartTimestamp().equals(other.getStartTimestamp()))
            && (this.getLastAccessTime() == null ? other.getLastAccessTime() == null : this.getLastAccessTime().equals(other.getLastAccessTime()))
            && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTenantCode() == null) ? 0 : getTenantCode().hashCode());
        result = prime * result + ((getSessionId() == null) ? 0 : getSessionId().hashCode());
        result = prime * result + ((getLoginName() == null) ? 0 : getLoginName().hashCode());
        result = prime * result + ((getDeptCode() == null) ? 0 : getDeptCode().hashCode());
        result = prime * result + ((getIpaddr() == null) ? 0 : getIpaddr().hashCode());
        result = prime * result + ((getLoginLocation() == null) ? 0 : getLoginLocation().hashCode());
        result = prime * result + ((getBrowser() == null) ? 0 : getBrowser().hashCode());
        result = prime * result + ((getOs() == null) ? 0 : getOs().hashCode());
        result = prime * result + ((getStartTimestamp() == null) ? 0 : getStartTimestamp().hashCode());
        result = prime * result + ((getLastAccessTime() == null) ? 0 : getLastAccessTime().hashCode());
        result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
        return result;
    }
}